﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IDAL;

namespace DAL
{
	public partial class DBSession 
    {
        public int SaveChanges(string type)
        {
            return new DBContextFactory().GetDbContext(type).SaveChanges();
        }
      
       private	IObject_DAL iObject_DAL;
		public IObject_DAL IObject_DAL
		{
			get
			{
				if(iObject_DAL==null)
					iObject_DAL= new Object_DAL();
				return iObject_DAL;
			}
			set
			{
				iObject_DAL= value;
			}
		}
    }

	public partial class DBSession:IDBSession
    {

		#region 01 数据接口 IAccountInfo_DAL
	    private	IAccountInfo_DAL iAccountInfo_DAL;
		public IAccountInfo_DAL IAccountInfo_DAL
		{
			get
			{
				if(iAccountInfo_DAL==null)
					iAccountInfo_DAL= new AccountInfo_DAL();
				return iAccountInfo_DAL;
			}
			set
			{
				iAccountInfo_DAL= value;
			}
		}
		#endregion

		#region 02 数据接口 IMarketplace_DAL
	    private	IMarketplace_DAL iMarketplace_DAL;
		public IMarketplace_DAL IMarketplace_DAL
		{
			get
			{
				if(iMarketplace_DAL==null)
					iMarketplace_DAL= new Marketplace_DAL();
				return iMarketplace_DAL;
			}
			set
			{
				iMarketplace_DAL= value;
			}
		}
		#endregion

		#region 03 数据接口 IMarketplaceServiceURL_DAL
	    private	IMarketplaceServiceURL_DAL iMarketplaceServiceURL_DAL;
		public IMarketplaceServiceURL_DAL IMarketplaceServiceURL_DAL
		{
			get
			{
				if(iMarketplaceServiceURL_DAL==null)
					iMarketplaceServiceURL_DAL= new MarketplaceServiceURL_DAL();
				return iMarketplaceServiceURL_DAL;
			}
			set
			{
				iMarketplaceServiceURL_DAL= value;
			}
		}
		#endregion

		#region 04 数据接口 IMerchant_DAL
	    private	IMerchant_DAL iMerchant_DAL;
		public IMerchant_DAL IMerchant_DAL
		{
			get
			{
				if(iMerchant_DAL==null)
					iMerchant_DAL= new Merchant_DAL();
				return iMerchant_DAL;
			}
			set
			{
				iMerchant_DAL= value;
			}
		}
		#endregion

		#region 05 数据接口 IReportRequestInfo_DAL
	    private	IReportRequestInfo_DAL iReportRequestInfo_DAL;
		public IReportRequestInfo_DAL IReportRequestInfo_DAL
		{
			get
			{
				if(iReportRequestInfo_DAL==null)
					iReportRequestInfo_DAL= new ReportRequestInfo_DAL();
				return iReportRequestInfo_DAL;
			}
			set
			{
				iReportRequestInfo_DAL= value;
			}
		}
		#endregion

    }

}